//
//  YCSessionRightViewButton.m
//  YCSchool
//
//  Created by gmall on 16/5/10.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//  联系界面右边按钮(上图下文字)

#import "YCSessionRightViewButton.h"

@implementation YCSessionRightViewButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel.font = [UIFont systemFontOfSize:13];
        [self setTitleColor:[UIColor yc_colorWithUInt:0x808080] forState:UIControlStateNormal];
    }
    return self;
}

- (void)setHighlighted:(BOOL)highlighted{}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageView.yc_x = (self.yc_width - self.imageView.yc_width) * 0.5;
    self.imageView.yc_y = 0;
    [self.titleLabel sizeToFit];
    self.titleLabel.yc_x = (self.yc_width - self.titleLabel.yc_width) * 0.5;
    self.titleLabel.yc_y = (self.yc_height - self.imageView.yc_height - self.titleLabel.yc_height)* 0.5 + CGRectGetMaxY(self.imageView.frame);
    
}

@end
